<?php
/**
 * @author Laurent SITTLER <lolo.sittler@gmail.com>
 * @author Alexandre GOMEZ <gomez.alexandre02@gmail.com>
 * @version 0.1
 */

/**
 * Login Controller
 */
class Login extends Controller {

    /**
     * Constructor
     */
    function __construct() {
        parent::__construct();
        if (Session::Get(Constants::$SESSION_cuser) != NULL)
        {
            header('location: ' . $GLOBALS['conf']['interface']['url']);
            exit;
        }
    }

    /**
     * @see Controller
     */
    protected function _Init() {
        parent::_Init();
         $this->GetView()->SetView('login');
    }

    /**
     * @see Controller
     */
    function Update() {
        parent::Update();
    }
    
    /**
     * Run login user
     */
    public function run(){
        $this->model->run();
    }
    
}